package com.czh.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.czh.subject.infra.basic.mapper.SubjectJudgeMapper;
import com.czh.subject.infra.basic.entity.SubjectJudge;
import com.czh.subject.infra.basic.service.SubjectJudgeService;
import org.springframework.stereotype.Service;

import java.util.List;
import lombok.RequiredArgsConstructor;

/**
 * 判断题(SubjectJudge)表服务实现类
 *
 * @author caozaihui
 * @since 2024-07-31 14:36:44
 */
@Service("subjectJudgeService")
@RequiredArgsConstructor
public class SubjectJudgeServiceImpl extends ServiceImpl<SubjectJudgeMapper, SubjectJudge> implements SubjectJudgeService {

        /** 
         * 
         * @param  id 主键
         * @author caozaihui  
         * @description //TODO  通过ID查询单条数据
         * @date 2024-07-31 14:36:44
         * @return 实例对象
         */
        @Override
        public SubjectJudge selectSubjectJudgeById (Long id) {
                return baseMapper.selectById(id);
        }
        
        /** 
         * 
         * @param subjectJudge 实例对象
         * @author caozaihui  
         * @description //TODO  分页查询数据
         * @date 2024-07-31 14:36:44
         * @return 实例对象
         */
        @Override
        public List<SubjectJudge> querySubjectJudgeList (SubjectJudge subjectJudge) {
            return baseMapper.selectSubjectJudgeList(subjectJudge);
        }
        
        /** 
         * 
         * @param subjectJudge 实例对象
         * @author caozaihui  
         * @description //TODO  新增数据
         * @date 2024-07-31 14:36:44
         * @return 实例对象
         */
        @Override
        public int insert(SubjectJudge subjectJudge) {
               return baseMapper.insert(subjectJudge);
        }
        
        
        /** 
         * 
         * @param subjectJudge 实例对象
         * @author caozaihui  
         * @description //TODO  修改数据并返回
         * @date 2024-07-31 14:36:44
         * @return 实例对象
         */
        @Override
        public int update(SubjectJudge subjectJudge) {
                return  baseMapper.updateById(subjectJudge);
        }
        
        
        /**
         *
         * @param idList 主键
         * @author caozaihui 
         * @description //TODO    通过主键删除数据
         * @date 2024-07-31 14:36:44
         * @return
         */
        @Override
        public int deleteByIds(List<Long> idList) {
            return baseMapper.deleteByIds(idList);
        }
}

